package com.designpatterns.observerpattern;

public class OctalObserver extends Observer
{

	public OctalObserver(Subject subject)
	{
		this.subject = subject;
		this.subject.attach(this);
	}

	// 将state转化为八进制
	@Override
	public void update()
	{
		System.out.println("Octal String: " + Integer.toOctalString(subject.getState()));
	}

}
